const path = require('path')
const webpackcommon = require('./webpack.common.js')
const { merge } = require('webpack-merge')
const webpack = require('webpack')

module.exports = merge(webpackcommon, {
  mode: 'development',
  entry: './src/main.js',
  output: {
    path: path.resolve(__dirname, 'dist')
  },
  target: 'web',
  devServer:{
    port: 5000,
    open: true,
    contentBase: ['./public', './src/assets']
  },
  resolve: {
    alias: {
      'vue$': 'vue/dist/vue.esm.js',
      'less-loader': 'less-loader'
    }
  },
  plugins: [
    new webpack.DefinePlugin({
      BASE_URL: JSON.stringify('/')
    })
  ]
})
